import request from '@/utils/request'

// 查询资讯-留言列表
export function listLeave(query) {
  return request({
    url: '/zx/leave/list',
    method: 'get',
    params: query
  })
}

// 查询资讯-留言详细
export function getLeave(id) {
  return request({
    url: '/zx/leave/' + id,
    method: 'get'
  })
}

// 新增资讯-留言
export function addLeave(data) {
  return request({
    url: '/zx/leave',
    method: 'post',
    data: data
  })
}

// 修改资讯-留言
export function updateLeave(data) {
  return request({
    url: '/zx/leave',
    method: 'put',
    data: data
  })
}

// 删除资讯-留言
export function delLeave(id) {
  return request({
    url: '/zx/leave/' + id,
    method: 'delete'
  })
}

// 导出资讯-留言
export function exportLeave(query) {
  return request({
    url: '/zx/leave/export',
    method: 'get',
    params: query
  })
}

export function issueLeave(id,issueStatus) {
  return request({
    url: '/zx/leave/issueLeave',
    method: 'get',
    params: {id:id,issueStatus:issueStatus}
  })
}
